import {uglify} from 'rollup-plugin-uglify';
import { minify } from 'uglify-es';
const plugins=[
    uglify(
        {
            toplevel: true,
          compress: {
            global_defs: {
                "@process.env.NODE_ENV":'"production"'
            },
            drop_console: false,
            drop_debugger:true,
          }
        },
        minify
      ),
]
export default [
    {
        input: 'src/jsaes.mjs',
        output: {
            file: 'dist/crypto.min.js',
            format: 'es',
        },
        plugins
    },
  {
        input: 'src/compiler.js',
        output: {
            file: 'dist/compiler.esm.min.js',
            format: 'es',
        },
        plugins
    },
    /**   {
      input: 'src/compiler.js',
      output: {
          file: 'dist/compiler.min.js',
          format: 'umd',
          name:'compiler',
      },
      plugins
    },
    {
        input: 'node_modules/es-module-shims/dist/es-module-shims.js',
        output: {
            file: 'dist/es-module-shims.min.js',
            format: 'iife',
            name:'esmsInitOptions',
        },
        plugins
      },**/
    {
        input: 'src/template_compiler.js',
        output: {
            file: 'dist/template_compiler.min.js',
            format: 'umd',
            name:'compiler',
        },
        plugins
    },
     {
        input: 'src/vue-shim.js',
        output: {
            file: 'dist/vue-shim.min.js',
            format: 'iife',
            name:'esmsInitOptions',
            extend:true
        },
        plugins
    },
]
